Regenerates the error handled by the containing Catch block. Can only be used in a Catch block. See Try...Catch...Finally.
Syntax
Throw()
Example
Sub SubWithTryCatch
Try
Err.Raise(6, "mySource", "New Error")
PrintLn("Statement cannot run because error was thrown")
Catch
PrintLn("Err 2: " + Err.Description())
'Throw() 'Clear the comment on this Throw statement and first PrintLn in Catch block below will not run
End Try
End Sub
Sub Main
ClearOutput()
Try
Try
Err.Raise(5, "otherSource", "Original Error")
PrintLn("Statement cannot run because error was thrown")
Catch
PrintLn("Err 1: " + Err.Description())
SubWithTryCatch()
PrintLn("Statement runs if Throw() statement above is uncommented")
PrintLn("Err 3: " + Err.Description())
Throw()
End Try
Catch
PrintLn("Err 4: " + Err.Description())
End Try
End Sub